/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};

/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {

/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId])
/******/ 			return installedModules[moduleId].exports;

/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			exports: {},
/******/ 			id: moduleId,
/******/ 			loaded: false
/******/ 		};

/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);

/******/ 		// Flag the module as loaded
/******/ 		module.loaded = true;

/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}


/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;

/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;

/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";

/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {

	//var FormItem = UcsmyUI.FormItem;
	var FormItem = __webpack_require__(3);

	var Root = React.createClass({displayName: "Root",
	    render: function () {
	        var PageDM = window.PageDM;

	        return (
	            React.createElement("div", null, 
	                React.createElement(FormItem, {label: "sdfs:", placeholder: "请输入", dmbind: PageDM.input1.dmbind, correctMsg: PageDM.input1.correctMsg}

	                ), 
	                React.createElement(FormItem, {placeholder: "请输入111", dmbind: PageDM.input2.dmbind}

	                )
	            )
	        )
	    }
	});
	UcsmyUI.Render(Root, document.getElementById('main'));

/***/ },
/* 1 */,
/* 2 */,
/* 3 */
/***/ function(module, exports, __webpack_require__) {

	/**
	 * Created by Administrator on 2017/3/1.
	 */
	var Input = __webpack_require__(4);
	var Label = __webpack_require__(5);

	var checkValidator = function (v, validate) {
	    var _msg;
	    for (var i = 0; i < validate.length; i++) {
	        var _type = validate[i].type;
	        if (_type === "require" && !v) {
	            _msg = validate[i].msg;
	            break;
	        } else if (_type == "fn") {
	            if (!validate[i].fn(v)) {
	                _msg = validate[i].msg;
	            }
	            break;
	        }
	    }
	    return _msg;
	}

	var FormItem = React.createClass({displayName: "FormItem",
	    getDefaultProps:function(){
	        return{
	            id:"",
	            label:"",
	            dmbind:"",
	            placeholder:"",
	            value:"",
	            name:"",
	            className:"",
	            correctMsg:''
	        }
	    },
	    render:function(){
	        var _udmid = this.props.dmbind;
	        UEventHub.on(_udmid + UI_EVENT_CONST.ONVALIDATE_EVENT,function(obj){
	            var tipNode = this.refs[_udmid],
	                tipInner,
	                _msg = checkValidator(obj.value,obj.validator);
	            if(!_msg){
	                tipInner = React.createElement("div", null, React.createElement("div", {className: "correct block"}, React.createElement("i", {className: "icon-correct iconfont"}), this.props.correctMsg));
	            }else{
	                tipInner = React.createElement("div", null, React.createElement("div", {className: "error block"}, React.createElement("i", {className: "icon-error iconfont"}), React.createElement("span", null, _msg)));
	            }
	            tipNode.innerHTML = tipInner.innerHTML;
	        }.bind(this));
	        return(
	            React.createElement("div", {className: "ucs-form-group " + this.props.className, id: this.props.id}, 
	                React.createElement(Label, {value: this.props.label}), 
	                
	                    this.props.children.length ?
	                        this.props.children.map(function(item,idx){
	                            return item;
	                        }):
	                        React.createElement(Input, {value: this.props.value, name: this.props.name, dmbind: this.props.dmbind, placeholder: this.props.placeholder}), 
	                
	                React.createElement("div", {className: "ucs-form-explain", ref: this.props.dmbind})
	            )
	        )
	    }
	});

	module.exports = FormItem;

/***/ },
/* 4 */
/***/ function(module, exports) {

	var Input =  React.createClass({displayName: "Input",
		getDefaultProps:function(){
			return {
				className:'ucs-input',
				dmbind:'',
			};
		},
		handler:function(){
			console.log('adfdfdf');
		},
		render:function(){
			return React.createElement("input", {type: "text", className: this.props.className, dmbind: this.props.dmbind})
		}
	})
	module.exports = Input;

/***/ },
/* 5 */
/***/ function(module, exports) {

	/**
	 * Created by DuHuiling on 2017/2/24.
	 */
	var Label = React.createClass({displayName: "Label",
	    getDefaultProps:function(){
	        return {
	            id:"",
	            setFor:"",
	            value:"这是Label",
	            className:""
	        }
	    },
	    render:function(){
	        return(
	            React.createElement("label", {id: this.props.id, For: this.props.setFor, className: "ucs-label "+this.props.className}, this.props.value)
	        )
	    }
	});
	module.exports = Label;

/***/ }
/******/ ]);